package com.ktgj.customer.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import com.ktgj.customer.domain.OrderPaymentRecord2Dto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.OrderPaymentRecord2Mapper;
import com.ktgj.customer.service.IOrderPaymentRecord2Service;

/**
 * 支付记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-10-26
 */
@Service
public class OrderPaymentRecord2ServiceImpl implements IOrderPaymentRecord2Service
{
    @Autowired
    private OrderPaymentRecord2Mapper orderPaymentRecord2Mapper;

    /**
     * 查询支付记录
     * 
     * @param payId 支付记录ID
     * @return 支付记录
     */
    @Override
    public OrderPaymentRecord2Dto selectOrderPaymentRecord2ById(Long payId)
    {
        return orderPaymentRecord2Mapper.selectOrderPaymentRecord2ById(payId);
    }

    /**
     * 查询支付记录列表
     * 
     * @param orderPaymentRecord2Dto 支付记录
     * @return 支付记录
     */
    @Override
    public List<OrderPaymentRecord2Dto> selectOrderPaymentRecord2List(OrderPaymentRecord2Dto orderPaymentRecord2Dto)
    {
        return orderPaymentRecord2Mapper.selectOrderPaymentRecord2List(orderPaymentRecord2Dto);
    }

    /**
     * 新增支付记录
     * 
     * @param orderPaymentRecord2Dto 支付记录
     * @return 结果
     */
    @Override
    public int insertOrderPaymentRecord2(OrderPaymentRecord2Dto orderPaymentRecord2Dto)
    {
        orderPaymentRecord2Dto.setCreateTime(DateUtils.getNowDate());
        return orderPaymentRecord2Mapper.insertOrderPaymentRecord2(orderPaymentRecord2Dto);
    }

    /**
     * 修改支付记录
     * 
     * @param orderPaymentRecord2Dto 支付记录
     * @return 结果
     */
    @Override
    public int updateOrderPaymentRecord2(OrderPaymentRecord2Dto orderPaymentRecord2Dto)
    {
        return orderPaymentRecord2Mapper.updateOrderPaymentRecord2(orderPaymentRecord2Dto);
    }

    /**
     * 批量删除支付记录
     * 
     * @param payIds 需要删除的支付记录ID
     * @return 结果
     */
    @Override
    public int deleteOrderPaymentRecord2ByIds(Long[] payIds)
    {
        return orderPaymentRecord2Mapper.deleteOrderPaymentRecord2ByIds(payIds);
    }

    /**
     * 删除支付记录信息
     * 
     * @param payId 支付记录ID
     * @return 结果
     */
    @Override
    public int deleteOrderPaymentRecord2ById(Long payId)
    {
        return orderPaymentRecord2Mapper.deleteOrderPaymentRecord2ById(payId);
    }
}
